Lazy Codes For Scientific Computations
نویسنده
چکیده
The lazy evaluation protocol defers the evaluation of a function arguments until the moment, when the function uses them. If such a function constructs composite data structures, it is possible to manipulate “infinite”, recursively open objects. We use these techniques to manipulate power series, to construct Padé approximants, to implement the differentiation of programs, etc. in a compact and readable way. Laziness permits to transform some intricate mathematical identities and equations into effective algorithms. We suggest that the lazy languages may be used as powerful algorithmization tools, often avoiding the blind usage of symbolic manipulation packages.
منابع مشابه
A Fast Maximum-Likelihood Decoder for Convolutional Codes
The lazy Viterbi decoder is a maximum-likelihood decoder for block and stream convolutional codes. For many codes of practical interest, under reasonable noise conditions, the lazy decoder is much faster than the original Viterbi decoder. For a code of constraint length , the lazy algorithm is about 50% faster than an optimized implementation of the Viterbi decoder whenever SNR dB. Moreover, wh...
متن کاملLazy AC-Pattern Matching for Rewriting
We define a lazy pattern-matching mechanism modulo associativity and commutativity. The solutions of a pattern-matching problem are stored in a lazy list composed of a first substitution at the head and a non-evaluated object that encodes the remaining computations. We integrate the lazy AC-matching in a strategy language: rewriting rule and strategy application produce a lazy list of terms.
متن کاملLazy Imperative Programming
In this paper we argue for the importance of lazy state, that is, sequences of imperative (destructive) actions in which the actions are delayed until their results are required. This enables state-based computations to take advantage of the control power of lazy evaluation. We provide some examples of its use, and describe an implementation within Glasgow Haskell.
متن کاملLazy Arithmetic
Finite-precision leads to many problems in geometric methods from CAD or Computational Geometry. Until now, using exact rational arithmetic was a simple, yet much too slow solution to be of any practical use in real-scale applications. A recent optimization { the lazy rational arithmetic ((4]) { seems promising: It defers exact computations until they become either unnecessary (in most cases) o...
متن کاملA Generic Lazy Evaluation Scheme for Exact Geometric Computations
We present a generic C++ design to perform efficient and exact geometric computations using lazy evaluations. Exact geometric computations are critical for the robustness of geometric algorithms. Their efficiency is also critical for most applications, hence the need for delaying the exact computations at run time until they are actually needed. Our approach is generic and extensible in the sen...
متن کامل